package com.df.bpm.controller;

import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaIgnore;
import com.df.bpm.dto.BusinessInputDTO;
import com.df.bpm.service.impl.BusinessInputDTOserviceImpl;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * 业务输入DTO查询器
 */
@Slf4j
@Tag(name = "业务输入DTO查询器")
@RequestMapping("/businessInputDTO")
@RequiredArgsConstructor
@RestController
@SaCheckLogin
public class BusinessInputDTOcontroller {
    /**
     * 业务输入（DTO）服务
     */
    public final BusinessInputDTOserviceImpl businessInputDTOserviceImpl;

    /**
     * 业务输入DTO信息模糊查询
     * @param temp 业务输入DTO线索
     */
    @Operation(summary = "获取业务输入信息", description = "获取业务输入信息")
    @PostMapping("getList4Like")
    @SaIgnore
    public ResponseEntity<List<BusinessInputDTO>> getList4Like(@RequestBody BusinessInputDTO temp) {
        return ResponseEntity.ok(businessInputDTOserviceImpl.getList4Like(temp));
    }

}
